package demo5;


interface IA {
    void test1();
}
interface IB {
    void test2();
}
interface IC extends IA,IB {
    void test3();
}
class Method implements IC{

    @Override
    public void test1() {

    }

    @Override
    public void test2() {

    }

    @Override
    public void test3() {

    }
}
public class Test {
    public static void Fly(IFlying iFlying) {
        iFlying.flying();
    }
    public static void Run(IRuning iRuning) {
        iRuning.runing();
    }
    public static void Swim(ISwimming iSwimming) {
        iSwimming.swimming();
    }
    public static void Eat(Animal animal) {
        animal.eat();
    }

    public static void main(String[] args) {
        Eat(new Dog("小狗",10));
        Run(new Dog("小狗",10));
        Swim(new Dog("小狗",10));
    }
    public static void main1(String[] args) {
        Eat(new Bird("小鸟",5));
        Fly(new Bird("小鸟",5));
    }

}
